package com.example.demo.utils

import me.liuwj.ktorm.database.Database
import org.springframework.stereotype.Component

@Component
object JzrDatabase {

    lateinit var database: Database

    // 本地mySql
//    val URL = "jdbc:mysql://localhost:3306/jzr_medical2?user=root&password=123456&useSSL=false&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT"

    // 阿里云mySql
    val URL = "jdbc:mysql://122.112.148.38:3306/szbber?user=szbber&password=123456&useSSL=false&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT"



    fun getDataBase(): Database {
        database = Database.connect(URL)
        return database
    }


}